import {
  LATENT_PRODUCT_TYPES_OPTIONS,
  PRODUCT_TYPES_ENUMS
} from '@/constants/commodity';
const qualificationTypeOptions = [
  {
    label: '检验报告',
    value: '1'
  },
  {
    label: '材质单',
    value: '2'
  },
  {
    label: '合格证',
    value: '3'
  },
  {
    label: '3C认证',
    value: '4'
  },
]
const maintenanceOptions = [
  {
    label: '否', // 未维护
    value: '1'
  },
  {
    label: '是', // 已维护
    value: '2'
  },
]
export const formItemList = [
  {
    prop: 'enumTempProduct',
    label: '商品大类',
    type: 'select',
    options: LATENT_PRODUCT_TYPES_OPTIONS,
    defaultVal: PRODUCT_TYPES_ENUMS.NORMAL
  },
  {
    label: '分类',
    prop: 'categoryPath',
    type: 'input',
  },
  {
    label: 'SPU编码',
    prop: 'spuNo',
    type: 'input'
  },
  {
    label: 'SKU编码',
    prop: 'skuNo',
    type: 'input'
  },
  {
    label: '商品名称',
    prop: 'productName',
    type: 'input'
  },
  {
    label: '资质名称',
    prop: 'qualificationName',
    type: 'input'
  },
  {
    label: '资质类型',
    prop: 'qualificationTypeNo',
    type: 'select',
    options: qualificationTypeOptions,
    clearable: true
  },
  {
    label: '供应商编码',
    prop: 'supplierCode',
    type: 'input'
  },
  {
    label: '供应商名称',
    prop: 'supplierName',
    type: 'input',
  },
  {
    label: '是否已维护',
    prop: 'isMaintain',
    type: 'select',
    options: maintenanceOptions,
    clearable: true
  }
]

export const tableColumns = [
  {
    title: '分类',
    key: 'categoryPath',
    width: 250
  },
  {
    title: 'SPU编码',
    key: 'spuNo',
  },
  {
    title: 'SKU编码',
    key: 'skuNo',
  },
  {
    title: '商品名称',
    key: 'productName',
  },
  {
    title: '品牌',
    key: 'brandName',
  },
  {
    title: '规格',
    key: 'specDetailStr',
  },
  {
    title: '资质类型',
    key: 'qualificationTypeName',
  },
  {
    title: '资质名称',
    key: 'qualificationName'
  },
  {
    title: '供应商编码',
    key: 'supplierCode'
  },
  {
    title: '供应商名称',
    key: 'supplierName'
  },
  {
    title: '是否已维护',
    key: 'isMaintainStr',
  },
  {
    title: '是否必填',
    key: 'mustHaveStr',
  },
]
